﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MathLib.Geometry
{
    public static class Triangle
    {
        /// <summary>
        /// Returns the area of a triangle
        /// </summary>
        /// <param name="b">Base</param>
        /// <param name="h">Height</param>
        /// <returns></returns>
        public static double Area(double b, double h)
        {
            return (b / 2) * h;
        }
        /// <summary>
        /// Returns the perimeter of the triangle
        /// </summary>
        /// <param name="side1">Length of side 1</param>
        /// <param name="side2">Length of side 2</param>
        /// <param name="side3">Length of side 3</param>
        /// <returns></returns>
        public static double Perimeter(double side1, double side2, double side3)
        {
            return side1 + side2 + side3;
        }
    }
}